package com.niiwoo.civet.trade.service.local.plan;

import com.niiwoo.civet.trade.dao.entity.*;
import com.niiwoo.civet.trade.dto.BorrowerRepaymentDTO;
import com.niiwoo.civet.trade.dto.RateConfigDTO;
import com.niiwoo.civet.trade.dto.common.BuildRepaymentDTO;
import com.niiwoo.civet.trade.dto.request.loan.RepaymentPlanDTO;
import com.niiwoo.civet.trade.enums.PeriodUnitEnum;
import com.niiwoo.civet.trade.enums.RepaymentTypeEnum;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface BorrowerInvestorRepaymentManager {

	boolean supports(InterestAccrualEnum interestAccrualEnum);

	List<RepaymentPlanDTO> getBorrowerRepaymentPlan(BigDecimal amount, BigDecimal yearRate, Integer deadline,
			PeriodUnitEnum periodUnitEnum, Date startDate, Integer leastCalculateInterestDays);

	List<RepaymentPlanDTO> getBorrowerRepaymentPlan(BuildRepaymentDTO buildRepaymentDTO, List<RateConfigDTO> rateConfigDTOList);

	BorrowerRepaymentDTO buildBorrowerRepaymentPlan(Project project, ProjectBorrowerSummary projectBorrowerSummary,
													List<ProjectRate> projectRateList);

	List<ProjectInvestorPlan> buildInvestorRepaymentPlan(Project project,
			List<ProjectInvestOrder> projectInvestOrderList, BorrowerRepaymentDTO borrowerRepaymentDTO);
}
